<?php
echo('<h2>Select the category to print:</h2>');
?>

<form action="<?=($HTTP_DIR . '/do/pdf_print_collection.php') ?>" method="post">
<select name="category" tabindex="16">
<option value="">unknown</option>
<?php
$category_query = "SELECT `id`,`category`,`default` FROM `category` ORDER BY `category`";
$category_result = mysql_query($category_query);
while ($category_row = mysql_fetch_row($category_result)) {
?><option value="<?=$category_row[0]?>"<?php 
if ($category_row[0] === $cat) {
	print(' selected="selected" ');
} elseif ($category_row[2]){
print(' selected="selected"');
}
?>><?=$category_row[1]?></option>
<?php
}
?>
</select><select name="status"><option value="0">Not In</option><option value="1">In Review</option><option value="2" selected="selected">In Rotation</option><option value="3">Old</option><option value="4">Archived</option><option value="5">Gone Forever</option></select>
<input type="hidden" name="cat" value="<?=$cat?>" />
<input type="hidden" name="mode" value="labelprint" />
<input type="hidden" name="do" value="pdf_print_collection" />
<input type="submit" value="Generate PDF" />
</form>